package rpc.core;


import rpc.bootstrap.springboot.Bootstrap;

/*********
 *
 *
 *@author 197
 *@date 2020/6/19 19:04
 *
 **/


public class RpcAppInitBean implements InitClose {

  private RpcApp rpcApp;
  private Bootstrap bootstrap;

  public RpcAppInitBean(RpcApp rpcApp) { // for kmock
    this.rpcApp = rpcApp;
  }

  public RpcAppInitBean(RpcApp rpcApp, Bootstrap bootstrap) {
    this.bootstrap = bootstrap;
    this.rpcApp = rpcApp;
  }

  public void postBuild() {

  }

  @Override
  public void init() {
    this.rpcApp.init();
  }

  @Override
  public void start() {
    this.rpcApp.start();
  }

  @Override
  public void close() {
    this.rpcApp.close();
  }
}
